package com.tom.jmgd.dao;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tom.jmgd.entity.param.SyncPdParam;
import com.tom.jmgd.entity.param.TLxCallbackLog;
import com.tom.jmgd.entity.param.huoban.huobanSynData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@DS("h2")
@Repository
@Mapper
public interface huobanSyncDataDao extends BaseMapper<huobanSynData> {
    public List<huobanSynData> getSyncData(@Param("table_name")String table_name, @Param("status")String status);
    public List<String> getSynTableName();
    public int updateSyncStatus(@Param("syn_record_id")int syn_record_id, @Param("item_id")String item_id, @Param("status")String status);
    public int deleteDownloadInterface(@Param("tableName")String tableName);
    public int insertDownloadInterface(@Param("itemId")String itemId,
                                       @Param("tableName")String tableName,
                                       @Param("fieldValue")String fieldValue,
                                       @Param("status")String status,
                                       @Param("colValue1")String colValue1,
                                       @Param("colValue2")String colValue2,
                                       @Param("colValue3")String colValue3,
                                       @Param("colValue4")String colValue4,
                                       @Param("colValue5")String colValue5,
                                       @Param("colValue6")String colValue6,
                                       @Param("colValue7")String colValue7,
                                       @Param("colValue8")String colValue8,
                                       @Param("colValue9")String colValue9,
                                       @Param("colValue10")String colValue10,
                                       @Param("colValue11")String colValue11,
                                       @Param("colValue12")String colValue12,
                                       @Param("colValue13")String colValue13,
                                       @Param("colValue14")String colValue14,
                                       @Param("colValue15")String colValue15,
                                       @Param("colLongValue16")String colLongValue16);
    public void syncBusinessMain();
    public void syncRightData();
    public void updateRightData();
    public void queryRightData();
    public int getSyncDataCount(@Param("table_name")String table_name, @Param("status")String status);

    //盘点业务逻辑
    //贪方便直接写在这里
    public void syncPdH(Map<String, Object> params);

    public void syncPdHByMakeno(Map<String, Object> params);

    public int selectPdStockKz(@Param("pdHid")Long pdHid);
}
